package com.lagou.service.impl;

import com.lagou.dao.EmpDao;
import com.lagou.domain.Employee;
import com.lagou.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpDao empDao;

    @Override
    public List<Employee> findAll() {
        return empDao.findAll();
    }

    @Override
    public void save(Employee employee) {
        empDao.save(employee);
    }

}
